package com.xuan.controller;

import com.xuan.entity.dto.UsersPageDTO;
import com.xuan.entity.result.PageResult;
import com.xuan.entity.vo.UserInfoVO;
import com.xuan.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;


@RestController
@RequestMapping("/users")
public class UsersController {
    @Autowired
    private IUsersService usersService;

    @GetMapping
    public PageResult<UserInfoVO> getUsers(@RequestParam Long userId, @RequestBody UsersPageDTO usersPageDTO, HttpServletRequest request) {
        return usersService.getUsers(userId, usersPageDTO, request);
    }
}
